package com.tdkj.model.decorate;

import java.util.Map;

import javax.persistence.CollectionTable;
import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.MapKeyColumn;
import javax.persistence.Table;
import com.tdkj.model.base.BaseEntity;

/**
 * 
 */
@Entity
@Table(name = "decorate_style")
public class BeanStyle extends BaseEntity {

	private String name;
	
	private Map<String,String> properties;
	
	
	public BeanStyle(){
		super();
	}
	public BeanStyle(String name) {
		super();
		this.name = name;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@ElementCollection
	@CollectionTable(name="decorate_style_properties", joinColumns={@JoinColumn(name="module_id",referencedColumnName="id")})
	@MapKeyColumn(name="_key")
	@Column(name="_value")
	public Map<String, String> getProperties() {
		return properties;
	}

	public void setProperties(Map<String, String> properties) {
		this.properties = properties;
	}

}